<!-- 外勤签到 -->
<template>
	<view class="public_view">
		<div class='customer_width' >
			<div class='customer_list' v-for="(item,index) in runDataSorce"  @click="toaout(item)">
				<div class='public_div_tow'>
					<div class="secode_img">
						<div class="secode_ph">
							<div>{{item.createUserName}}</div>
						</div>
						<div class="secode_txt">
							<text>{{item.z_time}}</text>
							<text>{{item.salesManName}}</text>
						</div>
					</div>
					<div class="secode_clas">
						<navtxt style="word-wrap:break-word; word-break:normal;" :result="item.remarks"></navtxt>
					</div>
					<div class="secode_clas">
						<text><h4><i class="iconfont icon-qian" style="padding-right: 10rpx; color: red;"></i>{{item.crmName}}</h4></text>
					</div>
				</div>
			</div>
		</div>
		<popus ref="alert" >
			<div :style="alertWidth">
				<acitdetals :selid="selid" @closes="closes"></acitdetals>
			</div>
		</popus>
	</view>
</template>

<script>
import acitdetals from '@/pages/common/index/subpage/activety/activitydetals'	
import popus from '@/uni_modules/uni-popup/components/uni-popup/uni-popup'
import navtxt from '@/pages/common/index/detial/detialtxt.vue'
import {pageList,detail} from '@/common/api/job/jobapi.js'
export default {
	props:{
		dataSorc: {
			default: ''
		},
		crmType: '',
		classid: '',
		name: ''
		
	},
	components:{
		popus,
		acitdetals,
		navtxt
	},
	data(){
		return {
			runDataSorce: [],
			alertWidth: '',
			selid:'',
		}
	},
	mounted() {
		this.runDataSorce = this.dataSorc;
		
		uni.getSystemInfo({
		    success: function (res) {
				_this.alertWidth = 'width:' + res.windowWidth + 'px;'
		    }
		});
		
	},
	methods:{
		
		// 跳转
		toaout(val){
			detail({id:val.crmId}).then((rows) => {
				if(rows.code == 200){
					uni.navigateTo({
						url: '/pages/common/index/detial?id=' + val.crmId +'&crmType=' + rows.data.crmType + '&classid=' + this.classid + '&name=' + this.name  + '&index=' + 2 
					})
				}
			})
		},
		open(val) {
			this.selid = val;
		     this.$refs.alert.open('right');
		},
		
		closes(val){
			if(val == 1){
				this.$refs.alert.close();
				location.reload();
			}else{
				this.$refs.alert.close();
			}
		}
	}
}
</script>

<style scoped lang="scss">
		
.public_view {
	height: 100%;
	width: 100%;
}
.secode_img {
	display: flex;
	.secode_txt {
		padding: 5px 0 0 30rpx;
	}
}

.secode_clas {
	padding: 5px 0 0 30rpx;
}

.public_div {
	width: 95%;
	margin: auto;
}
.public_div_title {
	line-height: 60rpx;
	display: flex;
	border-bottom: 1px solid #cacaca;
	padding: 10px 0 10px 0;
	.public_div_one {
		// width: 30%; 
		text-align: left;
		padding-left: 30rpx;
	}
	.public_div_tow {
		padding: 0 0 0 30rpx;
		div {
			margin: -10rpx;
		}
	}
	
}
.secode_ph {
			width: 40px;
			height: 40px;
			border-radius: 50%;
			text-align: center;
			line-height: 40px;
			font-size: 12px;
			background-color: #a94cd9ab;
			color: #fff;
		}

</style>
